home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / blts.arc / TECH.ARC / TECH.DOC < prev   
Text File  |  1991-10-15  |  56KB  |  1,545 lines

  1.                  LANtastic (tm) Network Operating System
  2.                   Technical Reference Manual (TECH.DOC)
  3.  
  4.                               Version 3.00
  5.  
  6.                    (c) COPYRIGHT 1989 by ARTISOFT, INC
  7.  
  8.                               INTRODUCTION
  9.  
  10. This manual is intended for programmers who wish to make use of the network
  11. services of the LANtastic Network Operating System (LANOS).  LANOS services
  12. described in this manual are for version 3.xx.  LANOS services fall into
  13. two categories: Standard MS-DOS compatible network functions and Extended
  14. network functions.  Since LANOS runs on any NETBIOS compatible LAN, NETBIOS
  15. functions are also available although they are intrinsic to the underlying
  16. NETBIOS implementation.
  17.  
  18. This manual assumes that the reader is familiar with 8088/80x86 assembly
  19. language and DOS system functions. Since the standard MS-DOS compatible
  20. network functions are described in the DOS technical reference manual, we
  21. will not go into great detail in this manual.
  22.  
  23. Throughout this manual references will be made to network paths.  LANOS
  24. network paths are fully compatibly with MS-DOS network paths.  Network
  25. paths are similar to file paths except that they reference files through
  26. the network.  The general syntax for network path is:
  27.  
  28.         \\server\path
  29.  
  30. where
  31.         server     is 1 to 15 character name of a network file server
  32.         path       is a DOS path on the server
  33.  
  34. For example,
  35.  
  36.         \\MAIN_SERVER\PROGS\DATA\SAMPLE.TXT
  37.  
  38. refers to a file located on server MAIN_SERVER.  The path required to
  39. access the file is PROGS\DATA\SAMPLE.TXT.  The directory PROGS is a shared
  40. network directory and may not actually exist on the server. It may in fact
  41. be an entire disk.
  42.  
  43. MS-NET compatible networks (e.g. IBM-PC LAN) do not fully support full
  44. paths for all systems calls (in particular Findfirst).  LANOS, however,
  45. supports full paths for all system calls that can take a path argument.
  46. This means that many public domain directory utilities will operate with a
  47. network path.  Refer to the OTHER USEFUL SYSTEM CALLS section for an
  48. example of using findfirst/next to get network data.
  49.  
  50.                              INDIRECT FILES
  51.  
  52. Version 3.xx of LANOS supports a new type of file for use on the network.
  53. This file type, know as an indirect file, resides on a server and is
  54. accessible to all users with the 'I' ACL privilege.  An indirect file
  55. contains server relative path information that is expanded in place of the
  56. file's name when a path is parsed by the server.  In other words, an
  57. indirect file points to another file or directory.  Whenever you refer to
  58. the indirect file, it's name is replaced by the file or directory it
  59. contains.
  60.  
  61. The following examples illustrate the operation of indirect files.
  62.  
  63. Given the following indirect files:
  64.  
  65.         Indirect file              Contents
  66.         -------------------        ---------------------
  67.         \ROOT\A                    \ROOT\AUTOEXEC.BAT
  68.         \MISC\C                    \ROOT\CONFIG.SYS
  69.         \ROOT\SOURCES\WIN.H        ..\INCLUDE\WINDOW.H
  70.         \ROOT\DOC                  \MISC\MANUALS\NEW\DOC
  71.  
  72. Some sample path expansions would be:
  73.  
  74.         Path                       Expansion
  75.         --------------------       --------------------------------
  76.         \ROOT\A                    \ROOT\AUTOEXEC.BAT
  77.         \MISC\C                    \ROOT\CONFIG.SYS
  78.         \ROOT\SOURCES\WIN.H        \ROOT\INCLUDE\WINDOW.H
  79.         \ROOT\DOC\INTRO            \MISC\MANUALS\NEW\DOC\INTRO
  80.         \ROOT\DOC\CHAPTERS\1       \MISC\MANUALS\NEW\DOC\CHAPTERS\1
  81.  
  82. As you can see from the above examples, indirect files can be used to point
  83. to other files or directories.  The advantage of indirect files is that the
  84. actual files or directories that they point to can reside on one area while
  85. multiple indirect file can reference them with a variety of names while
  86. residing in another directory.
  87.  
  88. Indirect files are not available directly from DOS.  To use indirect files
  89. you must reference them through the network.
  90.  
  91. System calls that are useful for the manipulation of indirect files are:
  92.  
  93.     5FB3H    Translate path
  94.     5FB4H    Create indirect file
  95.     5FB5H    Get indirect file contents
  96.  
  97. ERROR CODES
  98.  
  99. All MS-DOS compatible system calls and all LANOS specific system calls
  100. return error codes.  The error code number is always returned in AX.  When
  101. an error occurs the carry flag (CY) is set.  LANOS provides a mechanism for
  102. expanding the error code number into a text string.  The following is a
  103. list of error codes which may be returned by LANOS:
  104.  
  105. Error
  106. Number    Meaning
  107. ------    -------
  108. 01H    Invalid function number
  109. 02H    File not found
  110. 03H    Path not found
  111. 04H    File open limit has been exceeded or no handles left
  112. 05H    Access denied
  113. 06H    Invalid handle
  114. 07H    Memory control blocks destroyed
  115. 08H    The memory limit has been exceeded
  116. 09H    Invalid memory block address
  117. 0AH    Invalid environment
  118. 0BH    Invalid format
  119. 0CH    Invalid access code
  120. 0DH    Invalid data
  121. 0EH    RESERVED
  122. 0FH    Invalid drive was specified
  123. 10H    Attempt to remove current directory
  124. 11H    Not same device
  125. 12H    No more files
  126. 13H    Attempt to write on write protected disk
  127. 14H    Unknown unit
  128. 15H    Drive not ready
  129. 16H    Unknown command
  130. 17H    Data CRC error
  131. 18H     Bad request structure length
  132. 19H    Seek error
  133. 1AH    Unknown media
  134. 1BH    Sector not found
  135. 1CH    No paper
  136. 1DH    Write fault
  137. 1EH    Read fault
  138. 1FH    General failure
  139. 20H    Sharing violation
  140. 21H    Lock violation
  141. 22H    Invalid disk change
  142. 23H    FCB unavailable
  143. 24H    Sharing buffer overflow
  144. 25H    RESERVED
  145. 26H    Cannot complete file operation
  146. 27H-31H    RESERVED
  147. 32H    Network request not supported
  148. 33H    Network node ??????????????? is not listening
  149. 34H    The name already exists on the network
  150. 35H    Cannot locate network name
  151. 36H    The network is busy
  152. 37H    Server connection to network node ??????????????? broken
  153. 38H    The NETBIOS command limit has been exceeded
  154. 39H    The network adapter has malfunctioned
  155. 3AH    Incorrect response received from network node ???????????????
  156. 3BH    Unexpected network error from network node ???????????????
  157. 3CH    Incompatible network node ???????????????
  158. 3DH    Print queue full on network node ???????????????
  159. 3EH    No room for print file on network node ???????????????
  160. 3FH    The print file has been deleted on network node ???????????????
  161. 40H    The network name has been deleted
  162. 41H    You have been denied access on network node ???????????????
  163. 42H    Invalid network device
  164. 43H    The network name was not found
  165. 44H    The network name limit has been exceeded
  166. 45H    The session limit has been exceeded
  167. 46H     Network node ??????????????? has been temporarily paused
  168. 47H    The network request to network node ??????????????? was denied
  169. 48H    Print or disk redirection is paused on network node ???????????????
  170. 49H    Invalid network version
  171. 4AH    Account has expired
  172. 4BH    Password has expired
  173. 4CH    Login attempt invalid at this time
  174. 4DH    Disk limit has been exceeded on network node ???????????????
  175. 4EH    Not logged into network node ???????????????
  176. 4FH    RESERVED
  177. 50H    The file already exists
  178. 51H    RESERVED
  179. 52H    Cannot make directory entry
  180. 53H    Failure on critical error
  181. 54H    Too many redirections or logins to network node ???????????????
  182. 55H    Duplicate redirection or login to network node ???????????????
  183. 56H    Invalid username or password
  184. 57H    Invalid parameter
  185. 58H    Network data fault
  186. 59H    Function not supported on network
  187. 5AH    Required system component not installed
  188.  
  189. When you expand the error code into a text string the above question marks
  190. are expanded to the name of the node you were referring to.  To expand an
  191. error code into a text string you will need to issue a multiplex interrupt
  192. (2FH).  The calling sequence is:
  193.  
  194. INPUT:    AH    5
  195.     AL    0 for installation check
  196.         # for error code (in pre DOS 4.00)
  197.         1 or 2 for error code in DOS 4.00
  198.     BX    Error code
  199. OUTPUT:    FLAGS    NC if error code converted to text
  200.                 CY if error code can't be converted
  201.         ES:DI   Pointer to ASCIZ text buffer containing error text. This is
  202.                 a read only text buffer and you must not alter the text in
  203.                 this buffer.
  204.  
  205. If the error code is RESERVED it is expanded to "General failure".  The
  206. maximum width for the question mark fields is 15 characters.  The error
  207. text is automatically adjusted so that extra spaces are not in the text
  208. buffer.  For example the error text
  209.  
  210.     Network node ??????????????? is not listening
  211.  
  212. would be
  213.  
  214.     Network node HOST is not listening
  215.  
  216. for node HOST.
  217.  
  218. When coding for LANOS the following code sequence will work for MS-DOS
  219. 5.x, 4.x and 3.x:
  220.  
  221.     mov    ax, error_number        ; Get error number
  222.     mov    bx, ax                ; Place in BX also
  223.     mov    ah, 5
  224.     int    2fh
  225.       ; ES:DI now points to error string.
  226.  
  227. NOTE: LANOS does not check AL when running under DOS 4.x or 5.x so the
  228. values in AL are not important.  The value in AL is important if you are
  229. running on another network operating system such as IBM PC LAN.
  230.  
  231.                 TESTING FOR THE EXISTENCE OF THE NETBIOS
  232.  
  233. Before NETBIOS calls may be performed the NETBIOS must be installed.  The
  234. following code fragment illustrates how you should test for the existence
  235. of the NETBIOS.
  236.  
  237. ; An illegal NCB used to determine if the NETBIOS is present
  238.  
  239. illegal_NCB    db 7fh                 ; Illegal command
  240.                 db 63 dup (0)           ; Rest of NCB is 0
  241.  
  242. ;
  243. ; NETBIOS_PRESENT - Determine if we have a NETBIOS present
  244. ;
  245. ; IN:   DS      =  Current Data segment
  246. ;       ES      =  Current Data segment
  247. ;
  248. ; OUT:  AX      =  Destroyed
  249. ;       BX      =  Destroyed
  250. ;       FLAGS   =  NO CARRY if present
  251. ;                  CARRY if not present
  252.  
  253. NETBIOS_present     proc
  254.         push es
  255.         mov  ax, 355ch       ; Get 5C vector
  256.         int  21H
  257.         mov  ax, es
  258.         pop  es
  259.         cmp  ax, 0F000h      ; Pointing into BIOS?
  260.         je   no_vector       ; Yes - Then no real 5C
  261.         or   ax, bx          ; Test for 0
  262.         jnz  have_vector     ; Non-zero - Have 5C int
  263.  
  264. no_vector:
  265.         stc                  ; Show not present
  266.     ret
  267.  
  268. ; We have a legal 5C vector.  Now perform an illegal NCB
  269. ; request to make sure that it is a legal NETBIOS.
  270.  
  271. have_vector:
  272.         mov  al, 0
  273.         mov  bx, offset illegal_NCB
  274.         int  5cH
  275.         test al, al          ; Will get changed on illegal command
  276.         jz   no_vector
  277.         clc
  278.         ret
  279. NETBIOS_present    endp
  280.  
  281.      TESTING FOR THE EXISTENCE OF THE REDIRECTOR, SERVER AND LANPUP
  282.  
  283. You can issue a multiplex interrupt (2FH) to determine if the redirector,
  284. server or LANPUP software is installed.
  285.  
  286. INPUT:  AX  B800H
  287.  
  288. OUTPUT: AL  0   If neither redirector or server installed
  289.             NZ  Redirector, server or LANPUP installed
  290.             BL  Contains bits indicating which software is installed
  291.                 10000000b   Redirector has pop up receive message capability.
  292.                 01000000b   Server is installed
  293.                 00001000b   Redirector is installed
  294.                 00000010b   LANPUP is installed
  295.  
  296.  
  297.                   DETERMINING NETWORK SOFTWARE VERSION
  298.  
  299. You can issue a multiplex interrupt to determine which version of the
  300. network software is running.
  301.  
  302. INPUT:  AX   B809H
  303.  
  304. OUTPUT:    AH    Major version number
  305.     AL    Minor version number
  306.  
  307. NOTE:   The version numbers are returned as decimal numbers.  For example,
  308.         version 3.00 would return:
  309.  
  310.     AH    3
  311.     AL    0
  312.  
  313.                      THE ALTERNATE NETBIOS INTERFACE
  314.  
  315. The normal interface to the NETBIOS is via interrupt 5CH; the alternate
  316. interrupt to the NETBIOS is via interrupt 2AH.  The 2A interface is
  317. provided by the LANtastic redirector. Some NETBIOS programs do not use the
  318. standard 5C interface, but rather the alternate 2A interface.
  319.  
  320. The alternate interface (2A) was originally designed as a "higher" level
  321. interface to network communications rather than the "low" level interface
  322. (5C) provided by the NETBIOS.  The 2A interface, however, does not support
  323. any higher level functions than does the 5C interface and therefore has not
  324. become a standard as has the 5C interface.
  325.  
  326. The REDIR intercepts 2A interrupts and reformats them to 5C interrupts.  A
  327. list of the 2A interface functions that are supported are described below.
  328.  
  329. 2A interrupt functions are invoked by loading the AH or AX register with a
  330. function code and then issuing a software interrupt 2A.  For example,
  331.  
  332.         mov  ah, 0           ; Installation check
  333.         int  2AH             ; Call alternate NETBIOS interface
  334.  
  335. FUNCTION: INSTALLATION CHECK
  336. ============================
  337.  
  338. DESCRIPTION: Checks if a 2A interface is installed.
  339.  
  340. INPUTS:  AH     0
  341.  
  342. OUTPUTS: AH     0 if not installed
  343.                 not 0 if installed
  344.  
  345. FUNCTION: EXECUTE NETBIOS WITH NO ERROR RETRY
  346. =============================================
  347.  
  348. DESCRIPTION: Executes a NETBIOS command (similar to 5C interface).  The
  349.              NETBIOS command may be optionally retried on certain error
  350.              conditions.
  351.  
  352. INPUTS:  AX     01xxH or 0401H to execute NETBIOS with no error retry
  353.                 0400H to execute NETBIOS with error retry
  354.  
  355.                 Error codes that are automatically retried are:
  356.                       No sessions resources (09H)
  357.                       No listen (12H)
  358.                       Interface busy (21H)
  359.          ES:BX  Pointer to NCB
  360.  
  361. OUTPUTS: AL     NETBIOS error code
  362.          AH     0 if no error
  363.                 1 if error
  364.  
  365. FUNCTION: GET RESOURCE INFORMATION
  366. ==================================
  367.  
  368. DESCRIPTION: Return NETBIOS resources which are available for use.
  369.  
  370. INPUTS:  AH     5
  371.  
  372. OUTPUTS: BX     Available names (16 - names in use)
  373.          CX     Available NCBs (free NCBs)
  374.          DX     Available sessions (max sessions - pending sessions)
  375.  
  376.                  CONTROLLING REDIRECTED PRINTER STREAMS
  377.  
  378. You can control how output is sent to redirected printers in three ways:
  379.  
  380.  1. You can set a combine mode which does not separate multiple print jobs
  381.     when programs terminate or when the printer is opened or closed.
  382.  2. You can set a separate mode which separates print jobs when a program
  383.     terminates or when the printer is opened and closed.
  384.  3. You can flush redirected output, thereby forcing the printer to begin
  385.     printing.
  386.  
  387. The above three functions may be performed using the NET LPT COMBINE, NET
  388. LPT  SEPARATE and  NET LPT FLUSH commands.  Often these commands need to be
  389. performed within programs.  Two software interfaces are provided to allow
  390. you to control these functions.  These interfaces consist of 2AH interrupt
  391. interface and a standard 21H system call interrupt interface.
  392.  
  393. NOTE: The DOS COMMAND.COM program always sets redirected printer separate
  394. mode when it prompts for command input and therefore these interrupts are
  395. ineffective across multiple program invocations performed through
  396. COMMAND.COM.  The only exception to this is inside batch files, since
  397. COMMAND.COM does not prompt for command input.
  398.  
  399.  
  400.                          2AH INTERRUPT INTERFACE
  401.  
  402. FUNCTION: SET SPOOLED OUTPUT TO COMBINE MODE
  403. ============================================
  404.  
  405. DESCRIPTION: All printer output is combined into 1 print job regardless of
  406.              the printer being opened or closed or programs terminating.
  407.  
  408. INPUTS:  AX     0601H
  409.  
  410. OUTPUTS: none
  411.  
  412. FUNCTION: SET SPOOLED OUTPUT IN SEPARATE MODE
  413. =============================================
  414.  
  415. DESCRIPTION: Printer output is not combined when multiple programs are run
  416.              or when the printer is opened or closed.  This command
  417.              implicitly starts a new print job.
  418.  
  419. INPUTS:  AX     0602H
  420.  
  421. OUTPUTS: none
  422.  
  423. FUNCTION: FLUSH PRINTER OUTPUT
  424. ==============================
  425.  
  426. DESCRIPTION: Printer output is flushed and a new print job is started.  If
  427.              no output exists to be flush then this function has no effect.
  428.  
  429. INPUTS:  AX     0603H
  430.  
  431. OUTPUTS: none
  432.  
  433.                          21H INTERRUPT INTERFACE
  434.  
  435. FUNCTION: RETURN REDIRECTED PRINTER MODE
  436. ========================================
  437.  
  438. DESCRIPTION: Returns the current printer mode.
  439.  
  440. INPUTS:  AX     5D07H
  441.  
  442. OUTPUTS: DL     0 Redirected output is being combined
  443.                 1 Redirected output is being separated
  444.  
  445. FUNCTION: SET REDIRECTED PRINTER MODE
  446. =====================================
  447.  
  448. DESCRIPTION: Sets the current printer mode.
  449.  
  450. INPUTS:  AX     5D08H
  451.          DL     0 Set redirected output to be combined
  452.                 1 Set redirected output to be separated.  This command
  453.                   implicitly starts a new print job.
  454.  
  455. OUTPUTS: none
  456.  
  457. FUNCTION: FLUSH PRINTER OUTPUT
  458. ==============================
  459.  
  460. DESCRIPTION: Printer output is flushed and a new print job is started.  If
  461.              no output exists to be flush then this function has no effect.
  462.  
  463. INPUTS:  AX     5D09H
  464.  
  465. OUTPUTS: none
  466.  
  467.                    MS-DOS COMPATIBLE NETWORK FUNCTIONS
  468.  
  469. The MS-DOS network system call functions are supported with the exception
  470. of GET and SET PRINTER SETUP STRING (5E02H and 5E03H).  The printer setup
  471. functions are not supported because the printer setup strings are defined
  472. by the system administrator using the NET_MGR program.  They are stored in
  473. each printer's resource file (the @???????? files in LANTASTI.NET).
  474.  
  475. 5E00H    GET MACHINE NAME
  476. =====   ================
  477.  
  478. INPUT:  AX     5E00H
  479.         DS:DX  Pointer to 16 byte buffer where ASCIZ machine name is
  480.                returned
  481.  
  482. OUTPUT: FLAGS  NC if no error
  483.         CY     If error occurred
  484.         AX     Error code if error
  485.         CL     NETBIOS name number of machine name
  486.         CH     0 If machine name is not set
  487.                Not zero if machine name has been set
  488.         DS:DX  ASCIZ machine name
  489.  
  490. GET MACHINE NAME returns the name your computer is known by on the network.
  491. This name is specified when you run REDIR.  You may use the name and
  492. NETBIOS name number returned by this function to perform NETBIOS commands.
  493. You must not use any other names added by LANOS.
  494.  
  495.  
  496. 5E02H    SET PRINTER SETUP
  497. =====   =================
  498.  
  499. INPUT:  AX     5E02H
  500.         BX     Redirection list index
  501.         CX     Setup string size
  502.         DS:SI  Pointer to printer setup string
  503.  
  504. OUTPUT: FLAGS  NC if no error
  505.         CY     If error occurred
  506.         AX     Error code if error
  507.  
  508. SET PRINTER SETUP sets a setup string to be sent to the network printer
  509. whenever a file is queued to the printer.
  510.  
  511. NOTE: LANOS does not process this request since printer setup strings are
  512. controlled by the system administer using the NET_MGR program.  The system
  513. call DOES NOT return an error.
  514.  
  515. 5E03H    GET PRINTER SETUP
  516. =====   =================
  517.  
  518. INPUT:  AX     5E03H
  519.         BX     Redirection entry index
  520.         ES:DI  Pointer to area to contain setup string
  521.  
  522. OUTPUT: FLAGS  NC if no error
  523.         CY     If error occurred
  524.         AX     Error code if error
  525.         CX     Length of setup string
  526.  
  527. GET SETUP STRING will return the setup string set with 5E02H (Set Printer
  528. Setup) above.
  529.  
  530. NOTE: LANOS does not process this request since printer setup strings are
  531. controlled by the system administer using the NET_MGR program.  The system
  532. call DOES NOT return an error, however, and the length of the setup string
  533. (CX) returned will be 0.
  534.  
  535. 5F02H    GET REDIRECTED DEVICE ENTRY
  536. =====   ===========================
  537.  
  538. INPUT:  AX     5F02H
  539.         BX     Redirection entry index (index 0 specifies the first entry)
  540.         DS:SI  Pointer to 16-byte buffer for local device name
  541.         ES:DI  Pointer to 128-byte buffer to receive the network path
  542.                referred to by the redirected device
  543.  
  544. OUTPUT: FLAGS  NC if no error
  545.                CY if error occurred
  546.         AX     Error code if error
  547.         BL     Type of device
  548.                03H    Printer
  549.                04H    Disk
  550.         BH     Device status
  551.                Bit 0  0 If device is valid
  552.                       1 If device is not valid
  553.                Bits 1-7 reserved
  554.         CX     Value stored by 5F03H call (should be 0 for LANOS)
  555.         DX     May be destroyed
  556.         BP     May be destroyed
  557.         DS:SI  ASCIZ device name
  558.         ES:DI  ASCIZ network path
  559.  
  560. GET REDIRECTED DEVICE ENTRY returns information about a single redirected
  561. device (see Redirect Device, 5F03H).  This function may be used to build a
  562. list of redirected devices.
  563.  
  564. 5F03H    REDIRECT DEVICE
  565. =====   ===============
  566.  
  567. INPUT:  AX     5F03H
  568.         BL     Type of device
  569.                03H    Printer
  570.                04H    Disk
  571.         CX     Value to store with redirected device (Set this to 0 for
  572.                compatibility with LANOS)
  573.         DS:SI  Pointer to ASCIZ local device name.  For printer device
  574.                specify: PRN, LPT1, LPT2, LPT3, COM1 or COM2.  For disk
  575.                device specify A:, B:, C:, etc.
  576.         ES:DI  Pointer to network path for redirected device
  577.  
  578. OUTPUT: FLAGS  NC if no error
  579.         CY     If error occurred
  580.         AX     Error code if error
  581.  
  582. REDIRECT DEVICE allows you to connect local devices to network paths.  For
  583. example you could connect your LPT1 device to a printer attached to another
  584. node.  References to LPT1 would then be routed to the network.
  585.  
  586. 5F04H    CANCEL DEVICE REDIRECTION
  587. =====   =========================
  588.  
  589. INPUT:  AX     5F04H
  590.         DS:SI  Pointer to ASCIZ device name
  591.  
  592. OUTPUT: FLAGS  NC if no error
  593.         CY     If error occurred
  594.         AX     Error code if error
  595.  
  596. CANCEL DEVICE redirection allows you to remove a device redirection so that
  597. the device is restored to its former state.
  598.  
  599.                     LANOS EXTENDED NETWORK FUNCTIONS
  600.  
  601. LANOS provides an extended set of network system calls which allow network
  602. control which is not provided by the standard MS-DOS compatible network
  603. requests.
  604.  
  605.                         NOTES ON FUNCTION LISTINGS
  606.  
  607. Several functions (5F83H, 5FA0H, 5FA4H, 5FA5H, 5FB0H, 5FB2H) are used to
  608. obtain indexed data.  By convention the call is made with the requested
  609. index in BX (the index is always zero based unless otherwise noted).  Upon
  610. return from the call BX will contain the index of the NEXT login entry.
  611. The current index will be BX-1.
  612.  
  613. If the index passed in BX refers to an invalid entry, the server or
  614. redirector will index BX until they find a valid entry.  They will then
  615. return this entry AND BX incremented by one.  Due to this, only the
  616. immediately previous index can be assumed.
  617.  
  618. In several functions the notation <0> is used as in \\server<0>.  This
  619. refers to a binary zero NOT the characters <0>.  The previous example is
  620. equivalent to the data statement:
  621.  
  622.        db "\\server",0
  623.  
  624. In each function listing the INPUT section refers to Calling Registers
  625. while the OUTPUT section refers to Return Registers.  Function descriptions
  626. are only included if they aren't obvious by the name or by the descriptions
  627. of input or output values.
  628.  
  629.  
  630.                         EXTENDED FUNCTIONS
  631.  
  632.  
  633. 5F80H    GET LOGIN ENTRY
  634. =====   ===============
  635.  
  636. INPUT:  AX     5F80H
  637.         BX     Login entry index (0 based)
  638.         ES:DI  Pointer to 16-byte buffer to receive logged in server name
  639.  
  640. OUTPUT: FLAGS  NC if no error
  641.                CY if error occurred (or no more entries are available)
  642.         AX     Error code if error
  643.         BX     Same value used to call function (you must increment BX
  644.                yourself to get next entry)
  645.         DL     Adapter number used for log in
  646.         ES:DI  Pointer to ASCIZ server name which does NOT include the
  647.                \\ prefix
  648.  
  649.  
  650. 5F81H    LOGIN TO A SERVER
  651. =====   =================
  652.  
  653. INPUT:  AX     5F81H
  654.         ES:DI  Pointer to server, username and password in the form
  655.                \\server\username<0>password<0>
  656.                (If a NULL password is used, the form must be:
  657.                \\server\username<0><0><0>)
  658.         BL     Adapter number to use for log in attempt
  659.                0ffh   To try all valid adapters
  660.                0-5    To try adapter 0-5 explicitly
  661.  
  662. OUTPUT:    FLAGS    NC If no error
  663.         CY If error occurred
  664.     AX    Error code if error
  665.  
  666. NOTE: Redir will capitalize the input string.
  667.  
  668.  
  669. 5F82H    LOGOUT OF A SERVER
  670. =====   ==================
  671.  
  672. INPUT:    AX    5F82H
  673.     ES:DI    Pointer to server name to log out of in the form \\server<0>
  674.  
  675. OUTPUT: FLAGS  NC if no error
  676.                CY if error occurred
  677.         AX     Error code if error
  678.  
  679.  
  680. 5F83H    GET USERNAME ENTRY
  681. =====   ==================
  682.  
  683. INPUT:  AX     5F83H
  684.         BX     Username entry index (0 based)
  685.         ES:DI  Pointer to 16-byte buffer to receive username used for this
  686.                log in
  687.  
  688. OUTPUT: FLAGS  NC if no error
  689.                CY if error occurred
  690.         AX     Error code if error
  691.         BX     Next username entry index
  692.         DL     Adapter number used for log in
  693.         ES:DI  Pointer to ASCIZ username
  694.  
  695.  
  696. 5F84H    GET INACTIVE SERVER ENTRY
  697. =====   =========================
  698.  
  699. INPUT:  AX     5F84H
  700.         BX     Non-logged in server index
  701.         ES:DI  Pointer to 16-byte buffer to receive a server name that you
  702.                are NOT logged in to but which is available for logging in
  703.  
  704. OUTPUT: FLAGS  NC if no error
  705.                CY if error occurred
  706.         AX     Error code if error
  707.         BX     Same value used to call function (you must increment BX
  708.                yourself to get next entry)
  709.         DL     Adapter number the inactive server is on (this number may
  710.                be used as input to the LOGIN TO SERVER (5F81H) function)
  711.         ES:DI  Pointer to ASCIZ server name which does NOT include the \\
  712.                prefix
  713.  
  714.  
  715. 5F85H    CHANGE PASSWORD
  716. =====   ===============
  717.  
  718. INPUT:  AX     5F85H
  719.         ES:DI  Pointer to \\server\old-password<0>new-password<0>
  720.                You must be logged into server
  721.  
  722. OUTPUT: FLAGS  NC if no error
  723.                CY if error occurred
  724.         AX     Error code if error
  725.  
  726.  
  727. 5F86H    DISABLE ACCOUNT
  728. =====   ===============
  729.  
  730. INPUT:  AX     5F86H
  731.         ES:DI  Pointer to server and password in the form
  732.                \\server\password<0>.  You must be logged into server
  733.  
  734. OUTPUT: FLAGS  NC if no error
  735.                CY if error occurred
  736.         AX     Error code if error
  737.  
  738. DISABLE ACCOUNT disables the current logged in account.  It applies only
  739. when concurrent login entries are set to 1 (by NET_MGR).  The account must
  740. then be reenabled by the system manager.
  741.  
  742.  
  743. 5F87H    GET ACCOUNT
  744. =====   ===========
  745.  
  746. INPUT:  AX     5F87H
  747.         DS:SI  Pointer to 128-byte buffer to receive account information
  748.         ES:DI  Pointer to server in the form \\server<0>
  749.                You must be logged into server
  750.  
  751. OUTPUT: FLAGS  NC if no error
  752.                CY if error occurred
  753.         AX     Error code if error
  754.         BX     Destroyed
  755.  
  756. GET ACCOUNT returns the information for the account used to log into this
  757. server.  The buffer format follows:
  758.  
  759. User account structure
  760.  
  761. user_account    struc
  762. UA_name                db  16 dup (?)  ; Zero padded username
  763. UA_internal            db  16 dup (0)
  764. UA_description         db  32 dup (?)  ; Full user description
  765. UA_privilege           db  ?           ; Privilege bits (see bit mask
  766.                                        ;  definitions below)
  767. UA_concurrent          db  ?           ; Maximum concurrent log ins
  768. UA_allowed_times       db  42 dup (?)  ; 1 bit for each half hour for 7 day
  769.                                        ;  week beginning on Sunday.
  770.                                        ;  0 means allowed.
  771. UA_internal2           dw  ?
  772. UA_last_login_time     dw  2 dup (?)   ; Last time logged in
  773. UA_account_expiration  dw  2 dup (?)   ; Expiration date (MSDOS-format)
  774.                                        ;  Year, Month:Day
  775. UA_password_expiration dw  2 dup (?)   ; Expiration date (as above),
  776.                                        ;  0 Means no expiration date
  777. UA_password_extension  db  ?           ; 1-31  Number of days to reextend
  778.                                        ;        password after change
  779.                                        ; 0     No extension required
  780. UA_undelete_char       db  ?           ; First letter of UA_name when
  781.                                        ;  account is deleted (first
  782.                                        ;  character of UA_name is replaced
  783.                                        ;  with a zero.)
  784.  
  785. UA_future              db  4 dup (?)
  786. user_account    ends
  787.  
  788. Privilege bits for UA_privilege:
  789.  
  790. UA_privilege_superACL   equ 10000000b ; Bypass ACLs
  791. UA_privilege_superqueue equ 01000000b ; Bypass queue protection
  792. UA_privilege_peer       equ 00100000b ; Treat as local process
  793. UA_privilege_supermail  equ 00010000b ; Bypass mail protection
  794. UA_privilege_audit      equ 00001000b ; The user can create audit entries
  795. UA_privilege_system     equ 00000100b ; The user has system manager
  796.                                          privileges
  797.  
  798.  
  799. 5F97H    COPY FILE
  800. =====   =========
  801. INPUT:    AX    5F97H
  802.     CX:DX    Amount to copy (set to FFFF:FFFF to copy entire file)
  803.     SI    Source handle
  804.     DI    Destination handle
  805.  
  806. OUTPUT: FLAGS  NC if no error
  807.                CY if error occurred
  808.         AX     Error code if error
  809.         AX:DX  Amount copied
  810.  
  811. COPY FILE copies the source file (designated by the source handle) to the
  812. destination file (designated by the destination handle).  The copy is
  813. performed by the server and requires no workstation resources.
  814.  
  815.  
  816. 5F98H    SEND UNSOLICITED MESSAGE
  817. =====   ========================
  818. INPUT:    AX    5F98H
  819.         DS:SI   Pointer to message buffer (buffer format is described
  820.                 below)
  821.  
  822. OUTPUT: FLAGS  NC if no error
  823.                CY if error occurred
  824.         AX     Error code if error
  825.                NOTE: currently no errors are returned
  826.  
  827. Format of message buffer.  The 16-byte name fields (MB_machine, MB_server
  828. and MB_user) are null terminated and contain the first n characters to be
  829. matched. For example AB<0> will match ABxxxxxx...
  830.  
  831. message_buffer    struc
  832. MB_reserved    db  ?          ; Reserved field used by system call
  833. MB_type        db  ?          ; User defined message type (see bit mask
  834.                               ;  definitions below)
  835. MB_machine     db  16 dup (?) ; Machine name destination
  836. MB_server      db  16 dup (?) ; User must be logged into this server
  837. MB_user        db  16 dup (?) ; User must be using this username
  838. MB_originator  db  16 dup (?) ; Originator's machine name. Filled in when
  839.                               ;  message is received
  840. MB_text        db  80 dup (?) ; Message text
  841. message_buffer    ends
  842.  
  843.  
  844. Message buffer type.  The MBT_general type is used by NET and LANPUP to
  845. send rude messages.
  846.  
  847. MBT_general    equ  0     ; General message used by NET, LANPUP and others
  848. MBT_warning    equ  1     ; Server warning message
  849.  
  850.  
  851. 5F99H    GET LAST RECEIVED UNSOLICITED MESSAGE
  852. =====   =====================================
  853.  
  854. INPUT:  AX     5F99H
  855.         ES:DI  Pointer to message buffer (see function 5F98H for buffer
  856.                format)
  857.  
  858. OUTPUT: FLAGS  NC if no error
  859.                CY if error occurred (or if no message is pending)
  860.         AX     Error code if error
  861.  
  862.  
  863. 5F9AH    GET MESSAGE PROCESSING FLAG
  864. =====   ===========================
  865.  
  866. INPUT:  AX     5F9AH
  867.  
  868. OUTPUT: DL     Bits describing what processing should be done when an
  869.                unsolicited message is received
  870.         FLAGS  NC if no error
  871.                CY if error occurred
  872.         AX     Error code if error
  873.  
  874. Message processing bits
  875.  
  876. MPB_beep        equ 00000001b  ; Beep before message delivered
  877. MPB_deliver     equ 00000010b  ; Deliver message to message service
  878. MPB_auto_pop_up equ 00000100b  ; Pop up messages automatically
  879.  
  880.  
  881. 5F9BH    SET MESSAGE PROCESSING FLAG
  882. =====   ===========================
  883.  
  884. INPUT:  AX     5F9BH
  885.         DL     Bits describing what processing should be done when an
  886.                unsolicited message is received (see function 5F9AH for list
  887.                of bits)
  888.  
  889. OUTPUT: FLAGS  NC if no error
  890.                CY if error occurred
  891.         AX     Error code if error
  892.  
  893.  
  894. 5F9CH    POP UP LAST RECEIVED MESSAGE
  895. =====   ============================
  896.  
  897. INPUT:  AX     5F9CH
  898.         CX     Amount of time, in ticks, to leave message on the screen
  899.         DH     Line number of where message will be placed (topline is 0,
  900.                no validity checking done)
  901.  
  902. OUTPUT: FLAGS  NC if no error
  903.                CY if error occurred
  904.         AX     Error code if error
  905.                NOTE:  The only error currently returned is 0BH (Invalid
  906.                format).  This error is returned if the screen is not
  907.                currently in a text mode and the pop-up message can't be
  908.                displayed.
  909.  
  910. Pop up last received message displays the last received message on the
  911. screen.  The message is placed on the specified line for the specified
  912. time.  When the message is removed, the original screen contents are
  913. restored.  The message may be removed before the display time elapses by
  914. pressing the Esc key.
  915.  
  916.  
  917. 5FA0H    GET QUEUE ENTRY
  918. =====   ===============
  919.  
  920. INPUT:    AX    5FA0H
  921.     BX    Queue entry index (0 for first entry)
  922.         DS:SI   Pointer to 162-byte buffer to receive queue entry
  923.                 information
  924.     ES:DI    Pointer to server in the form \\server<0>
  925.  
  926. OUTPUT: FLAGS  NC if no error
  927.                CY if error occurred
  928.         AX     Error code if error
  929.         BX     Next queue entry index
  930.         DS:SI  Filled queue entry information buffer
  931.  
  932. Definition of a queue entry:
  933.  
  934. queue_entry        struc
  935. QE_status          db   ?          ; Status of queue entry
  936. QE_size            dd   ?          ; Size of spooled file
  937. QE_type            db   ?          ; Type of queue entry
  938. QE_output_control  db   ?          ; Control of despooled file
  939. QE_copies          dw   1          ; Number of copies
  940. QE_sequence        dd   ?          ; Sequence number of queue entry
  941. QE_spooled_file    db   48 dup (?) ; Pathname of spooled file
  942. QE_user            db   16 dup (?) ; Username who spooled file
  943. QE_machine         db   16 dup (?) ; Machine name user was on
  944. QE_date            dw   ?          ; Date file spooled (MS-DOS format)
  945. QE_time            dw   ?          ; Time file spooled (MS-DOS format)
  946. QE_destination     db   17 dup (?) ; ASCIZ Device name or username destination
  947. QE_comment         db   48 dup (?) ; Comment field
  948. queue_entry        ends
  949.  
  950. Different queue entry statuses:
  951.  
  952. QE_status_free        equ   0  ; The queue entry is empty
  953. QE_status_update      equ   1  ; The queue entry is being updated
  954. QE_status_hold        equ   2  ; The queue entry is held
  955. QE_status_wait        equ   3  ; The queue entry is waiting for despool
  956. QE_status_active      equ   4  ; The queue entry is being despooled
  957. QE_status_cancel      equ   5  ; The queue has been canceled
  958. QE_status_file_error  equ   6  ; The spooled file could not be accessed
  959. QE_status_spool_error equ   7  ; The destination could not be accessed
  960. QE_status_rush        equ   8  ; Rush this job
  961.  
  962. Different types of queue entries:
  963.  
  964. QE_type_print        equ   0  ; Spooled printer queue file
  965. QE_type_message      equ   1  ; Spooled message (mail)
  966. QE_type_local_file   equ   2  ; Spooled local file
  967. QE_type_remote_file  equ   3  ; Spooled remote file
  968. QE_type_modem        equ   4  ; Spooled to remote modem
  969. QE_type_batch        equ   5  ; Spooled batch processor file
  970.  
  971. Bit definitions for output control:
  972.  
  973. QE_OC_keep   equ 01000000b  ; Keep after despooling (don't delete)
  974.                             ; For mail - allow delete only by owner
  975. QE_OC_voice  equ 00100000b  ; For mail - mail file contains voice data
  976.  
  977.  
  978. 5FA1H    SET QUEUE ENTRY
  979. =====   ===============
  980.  
  981. INPUT:  AX     5FA1H
  982.         BX     Handle of opened queue entry
  983.         DS:SI  Pointer to queue information buffer (see function 5FA0
  984.                for buffer format)
  985.  
  986. OUTPUT: FLAGS  NC if no error
  987.                CY if error occurred
  988.         AX     Error code if error
  989.  
  990. SET QUEUE ENTRY allows you to set certain fields in a queue entry.  The
  991. queue entry must be open and you must have a handle to it.  The only fields
  992. that are looked at and altered are:
  993.  
  994.     QE_output_control
  995.     QE_copies
  996.     QE_destination    (only for MAIL queue entries)
  997.     QE_comment
  998.  
  999.  
  1000. 5FA2H    CONTROL QUEUE
  1001. =====   =============
  1002.  
  1003. INPUT:  AX     5FA2H
  1004.         BL     Queue control command (commands are listed below)
  1005.         ES:DI  Pointer to server in the form \\server<0>.
  1006.  
  1007.    For Cancel, Hold, Release and Rush commands:
  1008.  
  1009.         CX:DX  Sequence number to control
  1010.  
  1011.    For Start, Halt, Halt_EOJ, Pause, Single and Restart commands:
  1012.  
  1013.         DX     Physical printer number
  1014.                0, 1, 2 LPT1, LPT2, LPT3
  1015.                3, 4    COM1, COM2
  1016.                other   All printers
  1017.  
  1018. OUTPUT: FLAGS  NC if no error
  1019.                CY if error occurred
  1020.         AX     Error code if error
  1021.  
  1022. Control queue allows you to manipulate print jobs and physical printer
  1023. despooling.  You must have the proper privileges to do these commands.
  1024.  
  1025. Control queue commands.  User must have the Q privilege to use commands
  1026. marked with a (*).
  1027.  
  1028. CQ_start     equ   0   ;*Start despooling
  1029. CQ_halt      equ   1   ;*Halt despooling
  1030. CQ_halt_EOJ  equ   2   ;*Halt despooling at end of job
  1031. CQ_pause     equ   3   ;*Pause the despooler at end of job
  1032. CQ_single    equ   4   ;*Print single job
  1033. CQ_restart   equ   5   ;*Restart the current print job
  1034. CQ_cancel    equ   6   ; Cancel the currently printing job
  1035. CQ_hold      equ   7   ; Hold the queue entry
  1036. CQ_release   equ   8   ; Release a held queue entry
  1037. CQ_rush      equ   9   ;*Make the queue entry a rushed job
  1038.  
  1039.  
  1040. 5FA3H    GET PRINTER STATUS
  1041. =====   ==================
  1042.  
  1043. INPUT:  AX     5FA3H
  1044.         BX     Physical printer number:
  1045.                0, 1, 2  LPT1, LPT2, LPT3
  1046.                3, 4     COM1, COM2
  1047.                other    All printers
  1048.         DS:SI  Pointer to 15-byte buffer to receive printer status
  1049.                information
  1050.         ES:DI  Pointer to server in form \\server<0>
  1051.  
  1052. OUTPUT: FLAGS  NC if no error
  1053.                CY if error occurred
  1054.         AX     Error code if error
  1055.         BX     Next physical printer number
  1056.         DS:SI  Filled printer status buffer
  1057.  
  1058. If the printer is actively printing then more detailed information is also
  1059. returned.
  1060.  
  1061. Definition of a printer status entry:
  1062.  
  1063. PS             struc
  1064. PS_state        db  ?   ; Printer state (defined below)
  1065. PS_index        dw  ?   ; Queue index corresponding to print job being
  1066.                         ;  despooled.  (-1 if not despooling:  ignore rest
  1067.                         ;  of fields)
  1068. PS_CPS          dw  ?   ; Actual characters per second being output
  1069. PS_output_chars dd  ?   ; Characters actually output so far
  1070. PS_read_chars   dd  ?   ; Characters actually read from despooled file so
  1071.                         ;  far. May be used to compute percent completed.
  1072. PS_copies       dw  ?   ; Copies remaining to print
  1073. PS             ends
  1074.  
  1075. Definition of printer states:
  1076.  
  1077. printer_state        record  PS_state_pause:1, PS_state_value:7
  1078. PS_state_disabled    equ 0   ; Printer is disabled
  1079. PS_state_single_job  equ 1   ; Printer will stop at end of job
  1080. PS_state_multijob    equ 2   ; Printer should print multiple jobs
  1081.  
  1082.  
  1083. 5FA4H    GET STREAM INFO
  1084. =====   ===============
  1085.  
  1086. INPUT:  AX     5FA4H
  1087.         BX     Stream index number (0 based)
  1088.         DS:SI  Pointer to 13-byte buffer to receive stream information
  1089.         ES:DI  Pointer to server in the form \\server<0>
  1090.  
  1091. OUTPUT: FLAGS  NC if no error
  1092.                CY if error occurred
  1093.         AX     Error code if error
  1094.         BX     Next stream number
  1095.  
  1096. Each stream contains a logical printer resource template and a flag that
  1097. indicates if jobs printed for that logical printer resource should be
  1098. queued or not.
  1099.  
  1100. Definition of logical stream entry:
  1101.  
  1102. logical_stream struc
  1103. LS_queue       db  ?          ; 0 Disabled, non-zero Enabled
  1104. LS_template    db  12 dup (?) ; Template may contain ?'s (include "." as in
  1105.                               ;  @???????.???)
  1106. logical_stream ends
  1107.  
  1108.  
  1109. 5FA5H    SET STREAM INFO
  1110. =====   ===============
  1111.  
  1112. INPUT:  AX     5FA5H
  1113.         BX     Stream index number (0 based)
  1114.         DS:SI  Pointer to 13-byte buffer which contains stream information
  1115.                (see function 5FA4H for buffer format)
  1116.         ES:DI  Pointer to server in the form \\server<0>
  1117.  
  1118. OUTPUT: FLAGS  NC if no error
  1119.                CY if error occurred
  1120.         AX     Error code if error
  1121.  
  1122.  
  1123. 5FA7H    CREATE USER AUDIT ENTRY
  1124. =====   =======================
  1125.  
  1126. INPUT:  AX     5FA7H
  1127.         DS:DX  8-byte (max) ASCIZ reason code
  1128.         DS:SI  128-byte ASCIZ variable reason string
  1129.         ES:DI  Pointer to server in the form \\server<0>
  1130.  
  1131. OUTPUT: FLAGS  NC if no error
  1132.                CY if error occurred
  1133.         AX     Error code if error
  1134.  
  1135. See the LANtastic NOS manual for a description of the reason codes and
  1136. reason strings.
  1137.  
  1138.  
  1139. 5FB0H    GET ACTIVE USER INFORMATION
  1140. =====   ===========================
  1141.  
  1142. INPUT:  AX     5FB0H
  1143.         BX     Login entry index of server (0 based)
  1144.         DS:SI  Pointer to 44-byte buffer to receive a server login entry
  1145.         ES:DI  Pointer to server in the form \\server<0>
  1146.  
  1147. OUTPUT: FLAGS  NC if no error
  1148.                CY if error occurred
  1149.         AX     Error code if error
  1150.         BX     Next login entry index
  1151.         DS:SI  Filled buffer with login entry information (buffer format is
  1152.                described below)
  1153.  
  1154. Definition of active user entry:
  1155.  
  1156. active_user_entry    struc
  1157. AUE_VCID         dw   0           ; Virtual circuit number
  1158. AUE_state        db   ?           ; Login state (defined below)
  1159. AUE_command      db   ?           ; Last command issued
  1160. AUE_IO           db   5 dup (?)   ; Number of I/O bytes (40 bit number)
  1161. AUE_requests     db   3 dup (?)   ; Number of server requests (24 bit number)
  1162. AUE_name         db   16 dup (?)  ; Name of logged in user
  1163. AUE_machine      db   16 dup (?)  ; Name of remote logged in machine
  1164. active_user_entry    ends
  1165.  
  1166. Definition of the various login states and privileges:
  1167.  
  1168. AUE_state_starting       equ  00000000b ; We are in the middle of a login
  1169. AUE_state_in             equ  00000001b ; We are fully logged in
  1170. AUE_state_RPL            equ  00000010b ; Remote program load login
  1171.  
  1172. AUE_privilege_superACL   equ  10000000b ; Bypass ACLs
  1173. AUE_privilege_superqueue equ  01000000b ; Bypass queue protection
  1174. AUE_privilege_peer       equ  00100000b ; Treat as local process
  1175. AUE_privilege_supermail  equ  00010000b ; Bypass mail protection
  1176. AUE_privilege_audit      equ  00001000b ; The user can create audit entries
  1177. AUE_privilege_system     equ  00000100b ; The user has system manager
  1178.                                         ;  privileges
  1179.  
  1180. Active user entry commands:
  1181.  
  1182. AUEC_login           equ  0    ; Login into a server
  1183. AUEC_terminate       equ  1    ; Process termination
  1184. AUEC_open            equ  2    ; Open a file
  1185. AUEC_close           equ  3    ; Close a file
  1186. AUEC_create          equ  4    ; Create a file if it's there or not
  1187. AUEC_new             equ  5    ; Create a new file that is not there
  1188. AUEC_unique          equ  6    ; Create a unique file
  1189. AUEC_commit          equ  7    ; Commit disk data to disk
  1190. AUEC_read            equ  8    ; Read from file
  1191. AUEC_write           equ  9    ; Write to file
  1192. AUEC_delete          equ  10   ; Delete file
  1193. AUEC_set_attr        equ  11   ; Set file attributes
  1194. AUEC_lock            equ  12   ; Lock byte range
  1195. AUEC_unlock          equ  13   ; Unlock byte range
  1196. AUEC_create_dir      equ  14   ; Create a subdirectory
  1197. AUEC_delete_dir      equ  15   ; Delete a subdirectory
  1198. AUEC_rename_file     equ  16   ; Rename a file
  1199. AUEC_find_first      equ  17   ; Find first matching file
  1200. AUEC_find_next       equ  18   ; Find the next matching file
  1201. AUEC_disk_free       equ  19   ; Get disk free space
  1202. AUEC_get_queue       equ  20   ; Get a queue entry
  1203. AUEC_set_queue       equ  21   ; Set a queue entry
  1204. AUEC_control_queue   equ  22   ; Control the queue
  1205. AUEC_get_login       equ  23   ; Return login information
  1206. AUEC_get_link        equ  24   ; Return link description
  1207. AUEC_seek            equ  25   ; Seek to a file position
  1208. AUEC_get_time        equ  26   ; Get server's time
  1209. AUEC_audit           equ  27   ; Create audit entry
  1210. AUEC_multi_open      equ  28   ; Open file in a multitude of modes
  1211. AUEC_change_password equ  29   ; Change a password
  1212. AUEC_disable_account equ  30   ; Disable account from further log ins
  1213. AUEC_copy_file       equ  31   ; Local server file copy
  1214. AUEC_get_username    equ  32   ; Get a username from account file
  1215. AUEC_translate_path  equ  33   ; Translate a server's logical path
  1216. AUEC_create_indirect equ  34   ; Make indirect file
  1217. AUEC_get_indirect    equ  35   ; Get indirect file text
  1218. AUEC_printer_status  equ  36   ; Printer status obtained
  1219. AUEC_get_stream      equ  37   ; Get logical print stream information
  1220. AUEC_set_stream      equ  38   ; Set logical print stream information
  1221. AUEC_get_account     equ  39   ; Get an account record
  1222.  
  1223.  
  1224. 5FB1H    GET SHARED DIRECTORY INFORMATION
  1225. =====   ================================
  1226.  
  1227. INPUT:  AX     5FB1H
  1228.         DS:SI  Pointer to 64-byte buffer to receive shared resource
  1229.                description
  1230.         ES:DI  Pointer to server and resource in the form
  1231.                \\server\shared-resource<0>
  1232.  
  1233. OUTPUT: FLAGS  NC if no error
  1234.                CY if error occurred
  1235.         AX     Error code if error
  1236.         CX     ACL privilege bits for requesting user
  1237.         DS:SI  ASCIZ description of shared resource
  1238.  
  1239. ACL bit definition:
  1240.  
  1241. ACL_read        equ 1000000000000000b  ; (R) Allow open for read and reading
  1242. ACL_write       equ 0100000000000000b  ; (W) Allow open for write and writing
  1243. ACL_create_file equ 0010000000000000b  ; (C) Allow file creation
  1244. ACL_create_dir  equ 0001000000000000b  ; (M) Allow directory creation
  1245. ACL_lookup      equ 0000100000000000b  ; (L) Allow file/directory lookups
  1246. ACL_delete_file equ 0000010000000000b  ; (D) Allow file deletion
  1247. ACL_delete_dir  equ 0000001000000000b  ; (K) Allow directory deletion
  1248. ACL_rename      equ 0000000100000000b  ; (N) Allow file renaming
  1249. ACL_execute     equ 0000000010000000b  ; (E) Allow program execution
  1250. ACL_physical    equ 0000000001000000b  ; (P) Allow physical access to device
  1251. ACL_attribute   equ 0000000000100000b  ; (A) Allow attribute changing
  1252.  
  1253.  
  1254. 5FB2H    GET USERNAME FROM ACCOUNT FILE
  1255. =====   ==============================
  1256.  
  1257. INPUT:    AX    5FB2H
  1258.     BX    Username entry index (0 for first entry)
  1259.     DS:SI    Pointer to 16-byte buffer to receive username
  1260.     ES:DI    Pointer to server in the form \\server<0>
  1261.  
  1262. OUTPUT: FLAGS  NC if no error
  1263.                CY if error occurred
  1264.         AX     Error code if error
  1265.         BX     Next username entry index
  1266.         DS:SI  16-Character username retrieved from server's account file
  1267.                (NOT in ASCIZ form)
  1268.  
  1269.  
  1270. 5FB3H    TRANSLATE PATH
  1271. =====   ==============
  1272.  
  1273. INPUT:  AX     5FB3H
  1274.         DS:SI  Pointer to 128-byte buffer to receive translated path
  1275.         ES:DI  Pointer to full ASCIZ path (including server name)
  1276.                (e.g. \\server\root\prog\file.ext<0>)
  1277.         DX     Type of translation to be performed.  (The OR of the
  1278.                following bits)
  1279.                00000001b      Expand bottom path as indirect file
  1280.                00000010b      Translate to actual path relative to server's
  1281.                               disk.  (e.g C:\autoexec.bat)
  1282.  
  1283. OUTPUT: FLAGS  NC if no error
  1284.                CY if error occurred
  1285.         AX     Error code if error
  1286.         DS:SI  ASCIZ translated path
  1287.  
  1288. TRANSLATE PATH either translates an indirect file into the full network
  1289. path or it translates the given path into the path relative to the server.
  1290. This call can be used to determine how an indirect file is going to expand.
  1291.  
  1292. See Create Indirect File (5FB4H) for a description of indirect files.
  1293.  
  1294. For example, a server has a resource named programs which contains the
  1295. following path: d:\software\programs. If a user has redirected drive P: to
  1296. \\server\programs and the Translate Path call is made with DX set to
  1297. 00000010b, the following would be returned:  d:\software\programs.
  1298.  
  1299.  
  1300. 5FB4H    CREATE INDIRECT FILE
  1301. =====   ====================
  1302.  
  1303. INPUT:  AX     5FB4H
  1304.         DS:SI  Pointer to 128-byte ASCIZ server relative path which will be
  1305.                the indirect file's contents
  1306.         ES:DI  Pointer to indirect file's full ASCIZ path
  1307.                (e.g. "\\server\root\linkfile<0>")
  1308.  
  1309. OUTPUT: FLAGS  NC if no error
  1310.                CY if error occurred
  1311.         AX     Error code if error
  1312.  
  1313. CREATE INDIRECT FILE allows you to create an indirect file on a server.
  1314. Whenever the server references the indirect file, the contents of the
  1315. indirect file will be used instead of the indirect file's name.  For
  1316. example, if the indirect file \\server\root\linkfile contained the path
  1317. \misc\text.dat, then whenever the file \\server\root\linkfile was
  1318. referenced, the path \misc\text.dat would be substituted.
  1319.  
  1320.  
  1321. 5FB5H    GET INDIRECT FILE CONTENTS
  1322. =====   ==========================
  1323.  
  1324. INPUT:    AX    5FB5H
  1325.     DS:SI    Pointer to 128-byte buffer to receive indirect file contents
  1326.         ES:DI   Pointer to full network path of indirect file
  1327.  
  1328. OUTPUT: FLAGS  NC if no error
  1329.                CY if error occurred
  1330.         AX     Error code if error
  1331.         DS:SI  ASCIZ contents of indirect file (a path)
  1332.  
  1333. Get indirect file contents will return the contents of an indirect file.
  1334. This call can be used to determine what the actual contents of an indirect
  1335. file are.
  1336.  
  1337.  
  1338. 5FC0H    GET SERVER'S TIME
  1339. =====   =================
  1340.  
  1341. INPUT:    AX    5FC0H
  1342.     DS:SI    Pointer to 8-byte buffer to receive time information
  1343.     ES:DI    Pointer to server in the form \\server<0>
  1344.  
  1345. OUTPUT: FLAGS  NC if no error
  1346.                CY if error occurred
  1347.         AX     Error code if error
  1348.         DS:SI  Filled buffer with time information
  1349.  
  1350. Definition of time buffer:
  1351.  
  1352. time_block    struc
  1353. TB_year       dw  ?   ; Year
  1354. TB_day        db  ?   ; Day of month (1-31)
  1355. TB_month      db  ?   ; Month (1-12)
  1356. TB_minutes    db  ?   ; Minutes (0-59)
  1357. TB_hour       db  ?   ; Hour (0-23)
  1358. TB_hundredths db  ?   ; Hundredths of seconds (0-99)
  1359. TB_seconds    db  ?   ; Seconds (0-59)
  1360. time_block    ends
  1361.  
  1362.  
  1363. 5FD0H    GET REDIRECTED LINEPRINTER TIMEOUT
  1364. =====   ==================================
  1365.  
  1366. INPUT:  AX     5FD0H
  1367.  
  1368. OUTPUT: FLAGS  NC if no error
  1369.                CY if error occurred
  1370.         AX     Error code if error
  1371.         CX     Redirected line printer timeout in ticks (18.2 ticks = 1
  1372.                second)
  1373.                A value of 0 means timeouts are disabled
  1374.  
  1375.  
  1376. 5FD1H    SET REDIRECTED LINEPRINTER TIMEOUTS
  1377. =====   ===================================
  1378.  
  1379. INPUT:  AX     5FD1H
  1380.         CX     Line printer timeout in ticks (18.2 ticks = 1 second)
  1381.                A value of 0 disables timeouts
  1382.  
  1383. OUTPUT: FLAGS  NC if no error
  1384.                CY if error occurred
  1385.         AX     Error code if error
  1386.  
  1387.  
  1388. 5FE0H    GET DOS SERVICE VECTOR
  1389. =====   ======================
  1390.  
  1391. INPUT:  AX     5FE0H
  1392.  
  1393. OUTPUT: FLAGS  NC if no error
  1394.                CY if error occurred
  1395.         AX     Error code if error
  1396.         ES:BX  Pointer to current DOS service routine
  1397.  
  1398.  
  1399. 5FE1H    SET DOS SERVICE VECTOR
  1400. =====   ======================
  1401.  
  1402. INPUT:  AX     5FE1H
  1403.         ES:BX  New DOS service vector
  1404.  
  1405. OUTPUT: FLAGS  NC if no error
  1406.                CY if error occurred
  1407.         AX     Error code if error
  1408.  
  1409. The GET and SET DOS Service Vector calls allow you to take advantage of the
  1410. DOS busy checking that the redirector performs.  Whenever DOS is safe to be
  1411. called the redirector calls the routine pointed to by the Set Vector call.
  1412. This routine could then use any DOS calls without worrying about whether
  1413. DOS was 'safe' to be called.
  1414.  
  1415. To chain into the DOS service vector you must obtain the old vector (5FE0)
  1416. and save it.  When your service routine is called you will need to call the
  1417. old vector before beginning your processing.
  1418.  
  1419.  
  1420. 5FE2H    GET MESSAGE SERVICE VECTOR
  1421. =====   ==========================
  1422.  
  1423. INPUT:  AX     5FE2H
  1424.  
  1425. OUTPUT: FLAGS  NC if no error
  1426.                CY if error occurred
  1427.         AX     Error code if error
  1428.         ES:BX  Pointer to current message service routine
  1429.  
  1430.  
  1431. 5FE3H    SET MESSAGE SERVICE VECTOR
  1432. =====   ==========================
  1433.  
  1434. INPUT:  AX     5FE3H
  1435.         ES:BX  New message service vector location
  1436.  
  1437. OUTPUT: FLAGS  NC if no error
  1438.                CY if error occurred
  1439.         AX     Error code if error
  1440.  
  1441. These routines can be used to write a customized message receive/pop up
  1442. service.  This service could expand or limit the pop up messages the
  1443. redirector shows now.
  1444.  
  1445. To chain into the message service vector you must obtain the old vector
  1446. (5FE2) and save it.  When your service routine is called you will need to
  1447. call the old vector before beginning your processing.
  1448.  
  1449. (NOTE: when a service routine is called ES:BX will point to the currently
  1450. received message)
  1451.  
  1452.                         OTHER USEFUL SYSTEM CALLS
  1453.  
  1454.                   OBTAINING A LIST OF SHARED RESOURCES
  1455.  
  1456. The server's shared resources appear as directories or files in the
  1457. server's root directory (i.e. \\SERVER).  To obtain a list of the server's
  1458. shared resources you can issue a find first system call (4EH) with a path
  1459. to the server's network control directory (e.g. \\server\*.*).
  1460.  
  1461. For example, to return all shared resources:
  1462.  
  1463. search_path    db      "\\server\*.*",0
  1464.    . . .
  1465.    mov  ah, 4eh        ; Find first system call
  1466.    mov  cx, 11h        ; Include read-only & directory
  1467.    mov  dx, search_path
  1468.    int  21h
  1469.  
  1470.    . . .
  1471.  
  1472.    mov  ax, 5fb1h      ; Do a Get Shared Directory Information system call
  1473.    mov  si, offset shared_information_buffer
  1474.    mov  di, offset <filename result from find first/next call>
  1475.    int  21h
  1476.  
  1477.    mov  ah, 3fh        ; Find next system call
  1478.    int  21h
  1479.  
  1480.    . . .               ; \\server has a linkacl whose information can be
  1481.                        ;  obtained through the 5FB1H call.  Just point
  1482.                        ;  es:di at \\server<0>.
  1483.  
  1484. To return just printer resources:
  1485.  
  1486. search_path    db      "\\server\@*.*",0
  1487.    . . .
  1488.    mov  ah, 4eh        ; Find first system call
  1489.    mov  cx, 01h        ; Include read-only files
  1490.    mov  dx, offset search_path
  1491.    int  21h
  1492.  
  1493.    . . .               ; Open found file and read in data.  Note that @MAIL
  1494.                        ;  will be returned as a printer and should be
  1495.                        ;  masked off.
  1496.  
  1497.    mov  ah, 3fh        ; Find next system call
  1498.    int  21h
  1499.  
  1500.              LIST OF MS-DOS COMPATIBLE NETWORK SYSTEM CALLS
  1501.  
  1502. 5E00H    Get Machine Name
  1503. 5E02H    Set Printer Setup
  1504. 5E03H    Get Printer Setup
  1505. 5F02H    Get Redirected Device Entry
  1506. 5F03H   Redirect Device
  1507. 5F04H   Cancel Device Redirection
  1508.  
  1509.                LIST OF LANTASTIC NOS NETWORK SYSTEM CALLS
  1510.  
  1511. 5F80H   Get Login Entry
  1512. 5F81H   Login to a Server
  1513. 5F82H   Logout of a Server
  1514. 5F83H   Get Username Entry
  1515. 5F84H   Get Inactive Server Entry
  1516. 5F85H   Change Password
  1517. 5F86H   Disable Account
  1518. 5F87H   Get Account
  1519. 5F97H   Copy File
  1520. 5F98H   Send Unsolicited Message
  1521. 5F99H   Get Last Received Unsolicited Message
  1522. 5F9AH   Get Message Processing Flag
  1523. 5F9BH   Set Message Processing Flag
  1524. 5F9CH   Pop Up Last Received Message
  1525. 5FA0H   Get Queue Entry
  1526. 5FA1H   Set Queue Entry
  1527. 5FA2H   Control Queue
  1528. 5FA3H   Get Printer Status
  1529. 5FA4H   Get Stream Info
  1530. 5FA5H   Set Stream Info
  1531. 5FA7H   Create User Audit Entry
  1532. 5FB0H   Get Active User Information
  1533. 5FB1H   Get Shared Directory Information
  1534. 5FB2H   Get Username From Account File
  1535. 5FB3H   Translate Path
  1536. 5FB4H   Create Indirect File
  1537. 5FB5H   Get Indirect File Contents
  1538. 5FC0H   Get Server's Time
  1539. 5FD0H   Get Redirected Lineprinter Timeout
  1540. 5FD1H   Set Redirected Lineprinter Timeouts
  1541. 5FE0H   Get DOS Service Vector
  1542. 5FE1H   Set DOS Service Vector
  1543. 5FE2H   Get Message Service Vector
  1544. 5FE3H   Set Message Service Vector
  1545.